package com.boot.study.controller;

import com.boot.study.domain.TestUser;
import com.boot.study.service.TestUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author likz
 * @Date 2025/1/22 14:20
 * @Description
 **/
@RestController
@RequestMapping("/log")
public class LogRecordController {

    @Resource
    private TestUserService testUserService;

    @GetMapping("test")
    public String test(){
        return "999";
    }

    @PostMapping("test2")
    public void test2(TestUser testUser){
        testUserService.save(testUser);
    }
    @PostMapping("test3")
    public void test3(TestUser testUser){
        testUserService.update(testUser);
    }

}
